// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.

import './assets/index.js';
import './assets/reset.css';

import Vue from 'vue'
import App from './App'
// import router from './router'
// 引入vue-router 搭建路由
import VueRouter from 'vue-router'
// 引入vue-resource 用来获取数据
import VueResource from 'vue-resource';

import Shouye from './components/content/shouye/shouye'
import Market from './components/content/market/market'
import Cart from './components/content/cart/cart'
import My from './components/content/my/my'

// 调用
Vue.use(VueRouter);
Vue.use(VueResource);
Vue.config.productionTip = false;
let router = new VueRouter({
        routes: [{
                path: "/shouye",
                component: Shouye
            },
            {
                path: "/market",
                component: Market
            },
            {
                path: "/cart",
                component: Cart
            },
            {
                path: "/my",
                component: My
            }
        ]
    })
    /* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    template: '<App/>',
    components: { App }
})